package creature;

import processing.core.PGraphics;
import processing.core.PImage;
import toxi.geom.Vec2D;

public class Base {
	
	public static final int		BASE_ONE = 1;
	public static final int		BASE_TWO = 2;
	
	public static final float	RADIUS = 30;
	public static final float	MARGIN = 130;
	
	private PImage				_base;
	private PImage				_flag;
	
	private Vec2D 				_pos;
	
	public Base (Vec2D thePosition, PImage theBaseImage, PImage theFlag) {
		_pos	= thePosition;
		_base	= theBaseImage;
		_flag	= theFlag;
	}
	
	public Base (float theX, float theY, PImage theBaseImage, PImage theFlag) {
		_pos	= new Vec2D (theX, theY);
		_base	= theBaseImage;
		_flag	= theFlag;
	}
	
	public Vec2D position () {
		return _pos;
	}
	
	public void render (PGraphics theGraphics, boolean theFlagState) {
		theGraphics.noTint();
		if (_base != null) {
			theGraphics.image (_base, _pos.x, _pos.y);
		}
		if (theFlagState) {
			theGraphics.image (_flag, _pos.x, _pos.y);
		}
	}
}